<!DOCTYPE html>
<html lang="" style="font-size: 100px">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width,initial-scale=1.0">
    <link rel="icon" href="<%= BASE_URL %>favicon.ico">
    <title><%= htmlWebpackPlugin.options.title %></title>
    <link rel="stylesheet" href="./swiper.min.css">
    <script>
      /*
        rem, 像素尺寸 = 标注 rem 数值  *  根字体大小px

        header 705px * 120px
        HTML字体大小是100px  7.5rem * 1.2rem
        屏幕尺寸如果是 750px，刚好合适
        
        x / 750 * 100

      */

      // 立即执行函数，自执行函数，隔绝变量，不污染外面的变量
      (function() {
        // 根字体大小 = 窗口宽度 / 设计稿宽度 * 基础的根字体大小（选用100）
        function setFont() {
          // document.documentElement.clientWidth 是窗口的宽度
          var html = document.documentElement;
          var designWidth = 750;
          var windowWidth = html.clientWidth;
          var fontSize = windowWidth / designWidth * 100;
          html.style.fontSize = fontSize + 'px';
        }
        setFont();
        window.addEventListener('resize', setFont);
      })();
    </script>
  </head>
  <body style="font-size: 16px">
    <noscript>
      <strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
    </noscript>
    <div id="app"></div>
    <!-- built files will be auto injected -->
  </body>
  <script src="./swiper.min.js"></script>
</html>
